/**
*   \file   distance.h
*   \author Dave Reid
*   \brief  Header file for finding the distance between two objects.
*/
#ifndef __EAGL_DISTANCE_H_
#define __EAGL_DISTANCE_H_

#include "Distance/aabbtopoint.h"

namespace eagl
{

/**
*   \brief  Finds the distance between two objects.
*/
inline float distance_topoint(const AABB &aabb, const Point3 &point)
{
    return distance_aabbtopoint(aabb.getExtents(), aabb.getPosition(), point.getPosition());
}

/**
*   \brief  Finds the squared distance between two objects.
*/
inline float distance_topoint_sq(const AABB &aabb, const Point3 &point)
{
    return distance_aabbtopoint_sq(aabb.getExtents(), aabb.getPosition(), point.getPosition());
}

}

#endif  // __EAGL_DISTANCE_H_